<template>
  <div class="warpper">
    <div class="title">问卷列表</div>

    <a-table
      :columns="questColumn"
      :pagination="pagination"
      :data-source="questList"
      :loading="isLoading"
      :scroll="{ x: 990 }"
    >
      <template #operation="{ record }">
        <!-- <a class="lookDetail" @click="lookDetail(record)">修改</a> -->
        <a class="lookDetail" @click="lookDetail(record)">删除</a>
      </template>

      <template #state="{ record }">
        <template v-if="record.state">yes</template>

        <template v-else>no</template>
      </template>
    </a-table>
  </div>
</template>
<script lang="ts">
import { PaginationParam } from '@/model/common/PaginationParam';
import { defineComponent, ref } from 'vue';
import { questColumn } from './columns';
export default defineComponent({
  components: {},
  setup() {
    const isLoading = ref<boolean>(false);
    const questList = ref<any>([
      {
        num: 1,
        user: 'twx',
        time: '20220310',
        updatatime: '20220310',
        title: '测试问卷',
        state: '发布中',
        alive: 1,
        count: 20,
        type: '调查问卷',
        start: '20220310',
        end: '20220312',
      },
    ]);
    const pagination = new PaginationParam();
    pagination.total = 11;
    return { isLoading, questColumn, questList, pagination };
  },
});
</script>
<style lang="less" scoped>
.warpper {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  width: 100%;
  // border: 1px solid red;
  box-shadow: 6px 12px 25px rgb(232 232 232);
  background-color: white;
  padding: 10px;
  .title {
    line-height: 44px;
    color: #000000;
    font-size: 20px;
    font-weight: 600;
    padding: 0 0 10px 10px;
  }
  :deep(.ant-table-thead > tr > th, .ant-table-tbody > tr > td) {
    padding: 4px 16px;
  }
}
</style>
